Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow magclass objects without years #29

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

johanneskoch94
Copy link
Member

This PR builds off of #28, thanks @fbenke-pik !! (In some places the code changes are identical.)
It does the same thing, in a slightly different manner, that I think is more in-line with previous code.

Falk's text, repeated here for clarity:
This extends convertGDP to handle magclass objects with NULL as years dimension (assuming the unit conversion does not require the years for conversion, aka "current"))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fbenke-pik Here, I just drop the check. Any potential inconsistency is caught in transform_user_input, at the same location as it is caught when passing a tibble.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, if the magpie object doesn't have year info, then is won't have a year column. That will lead to an error below, if a unit is "current".

@johanneskoch94 johanneskoch94 merged commit 597c2c6 into pik-piam:main Aug 1, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants